package com.example.mylibrarybase.yumengmeng14.ui;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.example.mylibrarybase.R;
import com.example.mylibrarybase.bar.initAction_Bar;
import com.example.mylibrarybase.base.baseui.BaseActivity;
import com.example.mylibrarybase.yumengmeng14.utils.UtilsAutocreate;

public class MainActivity_14_animateLayoutChanges extends BaseActivity implements View.OnClickListener {

    private initAction_Bar mBase_action_bar;
    private TextView mMainActivity_14_animateLayoutChanges_tv;
    private LinearLayout MainActivity_14_animateLayoutChanges_ll;
    private TextView MainActivity_14_animateLayoutChanges_tv1;
    private TextView MainActivity_14_animateLayoutChanges_tv2;
    private int mTv1;
    private int mTv2;
    private TextView uuuu;
    private TextView MainActivity_14_animateLayoutChanges_tv3;
    private TextView MainActivity_14_animateLayoutChanges_tv4;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initView();
    }

    @Override
    public int getlayouXML() {
        return R.layout.activity_main_14_animate_layout_changes;
    }

    @Override
    public void initView() {
        mBase_action_bar = (initAction_Bar) findViewById(R.id.base_action_bar);
        mBase_action_bar.setMode(initAction_Bar.AUTO_ONCLICK_MODE)
                .setCallBack(new initAction_Bar.Action_bar_call_back() {
                    @Override
                    public void getAction_barView_backbutton(TextView textView) {

                    }

                    @Override
                    public void getAction_barView_backbutton_icon(ImageView imageView) {

                    }

                    @Override
                    public void getAction_barView_title(TextView textView) {
                        textView.setText("渐变View");
                    }

                    @Override
                    public void getAction_barView_right_icon(ImageView imageView) {

                    }
                });

        MainActivity_14_animateLayoutChanges_ll = (LinearLayout) findViewById(R.id.MainActivity_14_animateLayoutChanges_ll);
        MainActivity_14_animateLayoutChanges_tv1 = (TextView) findViewById(R.id.MainActivity_14_animateLayoutChanges_tv1);
        MainActivity_14_animateLayoutChanges_tv2 = (TextView) findViewById(R.id.MainActivity_14_animateLayoutChanges_tv2);
        MainActivity_14_animateLayoutChanges_tv3 = (TextView) findViewById(R.id.MainActivity_14_animateLayoutChanges_tv3);
        MainActivity_14_animateLayoutChanges_tv4 = (TextView) findViewById(R.id.MainActivity_14_animateLayoutChanges_tv4);
        MainActivity_14_animateLayoutChanges_tv1.setOnClickListener(this);
        MainActivity_14_animateLayoutChanges_tv2.setOnClickListener(this);
        MainActivity_14_animateLayoutChanges_tv3.setOnClickListener(this);
        MainActivity_14_animateLayoutChanges_tv4.setOnClickListener(this);

        initData();
    }

    @Override
    public void initData() {

    }

    @Override
    public void onClick(View view) {
        int i = view.getId();
        if (i == R.id.MainActivity_14_animateLayoutChanges_tv1) {
            UtilsAutocreate
                    .getUtilsAutocreate(this)
                    .setLinearLayout(MainActivity_14_animateLayoutChanges_ll)
                    .addfirst("first添加");
        }
        else if (i == R.id.MainActivity_14_animateLayoutChanges_tv2) {
            UtilsAutocreate
                    .getUtilsAutocreate(this)
                    .setLinearLayout(MainActivity_14_animateLayoutChanges_ll)
                    .addLast("Last添加");
        }
        else if (i == R.id.MainActivity_14_animateLayoutChanges_tv3) {
            UtilsAutocreate
                    .getUtilsAutocreate(this)
                    .setLinearLayout(MainActivity_14_animateLayoutChanges_ll)
                    .rMovefrist();
        }
        else if (i == R.id.MainActivity_14_animateLayoutChanges_tv4) {
            UtilsAutocreate
                    .getUtilsAutocreate(this)
                    .setLinearLayout(MainActivity_14_animateLayoutChanges_ll)
                    .rMoveLast();
        }
    }
}
